package com.cloud.order.mapper.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
* (User) 实体类
*
* @author zhangxun
* @since 2021-01-17
*/
@Data
@TableName(value = "user")
public class User implements Serializable {
    private static final long serialVersionUID=1L;
    /*** 用户id*/
    @TableId(type = IdType.AUTO)
    private Long id;

    /*** 用户名*/
    @TableField("username")
    private String username;

    /*** 密码*/
    @TableField("password")
    private String password;

    /*** 手机号*/
    @TableField("mobile")
    private String mobile;

    /*** 积分*/
    @TableField("score")
    private Integer score;

    /*** 注册时间*/
    @TableField("create_time")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /*** 可用余额*/
    @TableField("banlance")
    private BigDecimal banlance;

}